package com.ulook.lookplanet.data.source;

import com.ulook.lookplanet.common.AppServer;
import com.ulook.lookplanet.util.net.AsynRequestUtil;
import com.ulook.lookplanet.util.net.RequestParams;
import com.ulook.lookplanet.util.net.ResponseCallback;

/**
 * 描述：
 *
 * @author L1998
 * @data 2021/4/6
 */
public class SquareDataSource {

    /**
     * 查询热点话题
     */
    public void queryHotTopics(ResponseCallback callback){
        AsynRequestUtil.post(AppServer.ROOT_PATH + "/square/getHotTopics", null, null, callback);
    }

    /**
     * 获取推荐动态
     */
    public void loadData(int currUserId, int itemNum, ResponseCallback callback){
        RequestParams params = new RequestParams();
        params.put("currUserId", currUserId);
        params.put("itemNum", itemNum);
        AsynRequestUtil.post(AppServer.ROOT_PATH + "/square/loadArticles", params, null, callback);
    }

    /**
     * 添加浏览记录
     */
    /*public void addBrowseRecord(int currUserId, String artId, ResponseCallback callback){

    }*/
}
